home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 686 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: dagwood.cs.ucsb.edu!not-for-mail
  2. From: schapel@cs.ucsb.edu (Steve E. Chapel)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: g++2.7.2 bug
  5. Date: 5 Jan 1996 11:44:47 -0800
  6. Organization: Computer Science, UCSB
  7. Message-ID: <4cjv3f$1dv@dagwood.cs.ucsb.edu>
  8. References: <30EAB273.41C6@AED-Graphics.DE>
  9. NNTP-Posting-Host: dagwood.cs.ucsb.edu
  10.  
  11. Joerg Leinhoss <Leinhoss@AED-Graphics.DE> writes:
  12.  
  13. >The functions a and b differs only in the function global declaration of i, j
  14. >and k. One macro version makes a simple function call, the other make a array
  15. >access with i, j and k. Both functions should produce the same result with both
  16. >output macros!
  17.  
  18. >While compiling g++2.7.2 warns:
  19. >test.cc: In function `void a()':
  20. >test.cc:12: warning: name lookup of `i' changed for new ANSI `for' scoping
  21. >test.cc:10: warning:   using obsolete binding at `i'
  22.  
  23. >Ok, I know what this means. No Comment.
  24.  
  25. You think you know what it means, but you don't. g++ is telling your where
  26. your bug is. I put in the missing int's and the program worked with g++ 2.7.2.
  27. To be fair, it does look like a bug in g++ in the sense that it didn't use
  28. the obsolete binding correctly, but there is also a bug in your program
  29. in the sense that it is not compliant with draft standard C++.
  30.  
  31. My advise: report this bug in gnu.g++.bug where this post belonged in the
  32. first place.
  33. -- 
  34. Steve Chapel        schapel@cs.ucsb.edu    |    http://www.cs.ucsb.edu/~schapel
  35.    Senior in Computer Science at the       |    Check out my updated web page!!
  36. University of California, Santa Barbara    |    finger -l schapel@eci1.ucsb.edu
  37. "I jumped, O my brothers, and I fell hard, but I did not snuff it." - Alex
  38.